package com.olinsports.system.olinsportssystem.manager;

import com.olinsports.system.olinsportssystem.model.SavingDetail;
import com.olinsports.system.olinsportssystem.model.SiteConsumptionDetails;
import com.olinsports.system.olinsportssystem.service.SavingDetailService;
import com.olinsports.system.olinsportssystem.service.SiteConsumptionDetailsService;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/7/22.
 */
@Component
public class SiteConsumptionDetailsManager {
    @Autowired
    private SiteConsumptionDetailsService siteConsumptionDetailsService;


    public SiteConsumptionDetails selectByKey(int siteDeatilsKey){
        return siteConsumptionDetailsService.selectByKey(siteDeatilsKey);
    }

    public Map listSiteDetails(String page, String rows,String sord, String sidx){
        return siteConsumptionDetailsService.listSiteDetails(page,rows,sord,sidx);
    }

    public Map searchDate(String page, String rows,String startDate,String endDate){
        return siteConsumptionDetailsService.searchDate(page,rows,startDate,endDate);
    }


    public ModelAndView toDcExcel(String startDate, String endDate, HSSFWorkbook workbook) throws Exception{
        return siteConsumptionDetailsService.toDcExcel(startDate,endDate,workbook);
    }

    public Map searchSelf(String page, String rows,String field,String fieldValue){
        return siteConsumptionDetailsService.searchSelf(page,rows,field,fieldValue);
    }

    public Map searchMoreSelf(String page, String rows,String fieldValue){
        return siteConsumptionDetailsService.searchMoreSelf(page,rows,fieldValue);
    }

    public int getSumTotal(){
        return siteConsumptionDetailsService.getSumTotal();
    }

}
